﻿using System.Text;
using Axios.Engine;
using Microsoft.Xna.Framework;
using Microsoft.Xna.Framework.Graphics;

namespace axios_tennis
{
    class Credits : AxiosGameScreen
    {
        private string _credits_string;
        private SpriteFont sf;
        private Vector2 textpos;
        //private bool pause = false;

        public override void  Activate(bool instancePreserved)
        {
            base.Activate(instancePreserved);

            StringBuilder sb = new StringBuilder();

            
            sb.Append("\n");
            sb.Append("\n");
            sb.Append("\n");
            sb.Append("\n");
            sb.Append("\n");
            sb.Append("\n");
            sb.Append("\n");
            sb.Append("\n");
            sb.Append("\n");
            sb.Append("\n");
            sb.Append("\n");
            sb.Append("\n");

            sb.Append("Developer\n");
            sb.Append("Nathan Adams\n\n");

            sb.Append("\n");
            sb.Append("\n");

            sb.Append("Tools used\n");
            sb.Append(Axios.Settings.Version + "\n");
            sb.Append("Notepad++\n");
            sb.Append("Winmerge\n");
            sb.Append("Anksvn\n");
            sb.Append("XNA 4.0\n");
            sb.Append("Farseer 3.3.1\n");
            sb.Append("Paint.Net\n");
            sb.Append("Dokuwiki\n\n");
            sb.Append("Traq\n");

            sb.Append("\n");
            sb.Append("\n");
            sb.Append("\n");
            sb.Append("\n");
            sb.Append("\n");

            sb.Append("You may now exit\n");
            sb.Append("\n");
            sb.Append("\n");
            sb.Append("\n");
            sb.Append("\n");
            sb.Append("\n");

#if WINDOWS
            sb.Append("No really...just hit esc!");
#else
            sb.Append("No really...just hit back!");
#endif
            sb.Append("\n");
            sb.Append("\n");
            sb.Append("\n");
            sb.Append("\n");
            sb.Append("\n");
            sb.Append("\n");

            sb.Append("All hail our robotic overloards!");

            _credits_string = sb.ToString();
            textpos = new Vector2(-130, 0);
            sf = ScreenManager.Game.Content.Load<SpriteFont>("Fonts/credits");
        }

        public override void Update(GameTime gameTime, bool otherScreenHasFocus, bool coveredByOtherScreen)
        {
            base.Update(gameTime, otherScreenHasFocus, coveredByOtherScreen);

            textpos.Y += -.5f;
        }

        public override void Draw(GameTime gameTime)
        {
            base.Draw(gameTime);
            ScreenManager.SpriteBatch.Begin(0, null, null, null, null, null, Camera.View);
            ScreenManager.SpriteBatch.DrawString(sf, _credits_string, textpos, Color.Black);
            ScreenManager.SpriteBatch.End();
        }
    }
}
